// Octopod
// Copyright
//
// GPL
//
// This file contains a class to represent a single share that we know about.

#ifndef OCTOPOD_SHARE_H__
#define OCTOPOD_SHARE_H__

#include <string>

#include <QSharedPointer>
#include "peer.h"

namespace octopod {

// incomplete at the moment
class Share {
  public:
    const Botan::SymmetricKey &peer_auth_key() const { return peer_auth_key_; }
    const Botan::SymmetricKey &peer_session_key() const { return peer_session_key_; }
    QSharedPointer<Peer> me() { return me_; }

    // Returns this share's ID hash.
    const std::string &idhash();

  private:
    // keys derived from the share master key
    Botan::SymmetricKey peer_auth_key_; // the peer authentication key
    Botan::SymmetricKey peer_session_key_; // the peer session base key

    QSharedPointer<Peer> me_; // represents which of my identities is in this share
};

}

#endif  // OCTOPOD_SHARE_H__
